NoSQL operator: keysearch

Display table records which leftmost field matches a given string.

Usage:  keysearch [options] string table

Options:
    --help (-h)
      Print this help info.

    --fold (-f)
      Ignore the case of alphabetic characters.

    --partial (-p)
      Partial (initial) match.

    --no-header (-N)
      Strip table header from output.

    --index (-I) 'file'
      Use the specified secondary index file.

    --soundex[=n] (-S[n])
      Search for the Soundex code of 'string', as opposed to
      its literal value. It is assumed that the table (or the
      index) being searched is also built on soundex codes as
      opposed to literal strings. If 'n' is not specified, it
      defaults to the standard soundex code length of four
      characters. Option '-S' overrides '-f' and '-p'.

    --test (-t)
      Instead of printing the table of matching rows, just
      return 0 if at least one matching row was found, or 1
      otherwise.

Notes:

This operator does a fast binary search on a NoSQL table file, looking
for records which first column begins with the specified 'string'. The
table being searched must be sorted alphabetically on the leftmost column.
This program is a header-aware front-end to the bsearch(1) utility. Refer
to the man page of the latter for more info. Since return code '1' is used
by bsearch(1) to signal the no-match condition, 'keysearch' will exit with
return code '2' in case of any other errors. Apart from option '-f', which
is passed to bsearch(1), no other bsearch(1) options are recognized. The
maximum acceptable length of the 'string' argument is 255 characters.
Back